<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>

    <title>更新</title>
    <!-- Bootstrap core CSS -->
    <link href="../static/asserts/css/bootstrap.min.css" th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="../static/asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="sidbar::#topbar"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="sidbar::#sbar(activeUri='main.html')"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="chartjs-size-monitor"
                 style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;">
                <div class="chartjs-size-monitor-expand"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div>
                </div>
                <div class="chartjs-size-monitor-shrink"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:200%;height:200%;left:0; top:0"></div>
                </div>
            </div>

            <form  class="form-horizontal" th:if="${type=='mes'}" th:action="@{/updTea}" method="post" style="margin: auto;margin-top:80px;border: 1px gray solid;width: 400px;background: #c7c4ff">
              <div style="margin-left: 100px">修改我的个人基本信息：</div>
                <p  th:text="${error}" style="color: red;margin-left: 100px" th:if="${not #strings.isEmpty(error)}"></p>
                <input type="text" name="id" th:value="${teacher.getId()}" hidden/>
                <input type="text" name="loginTime" th:value="${teacher.getLoginTime()}" hidden/>
                <input type="text" name="registTime" th:value="${teacher.getRegistTime()}" hidden/>
                <input type="text" name="pwd" th:value="${teacher.getPwd()}" hidden/>
                <input type="text" name="perms" th:value="${teacher.getPerms()}" hidden/>
                <div class="form-group">
                    <label class="col-sm-4  control-label" >名字：</label>
                    <div class="col-sm-10">
                        <input type="text" name="name" class="form-control"   th:required th:value="${teacher.getName()}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-4  control-label" >帐号：</label>
                    <div class="col-sm-10">
                        <input type="text" name="zh" class="form-control"   th:required th:value="${teacher.getZh()}">
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-4 control-label">年龄：</label>
                    <div class="col-sm-10">
                        <input type="text" name="age" th:value="${teacher.getAge()}" class="form-control"   th:required>
                    </div>
                </div>
                <div class="form-group" style="margin-left: 100px">
                    <label>性别：</label><br/>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="sex" th:value="1"th:checked="${teacher.getSex()==1}">
                        <label class="form-check-label">男</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input"   type="radio" name="sex" th:value="2" th:checked="${teacher.getSex()==2}" >
                        <label class="form-check-label">女</label>
                    </div>
                </div>
                <!--						以下拉框来输入classid-->
                <br>
                <div class="form-group" style="margin-left: 50px">
                    <div class="col-sm-offset-2 col-sm-10">
                        <input type="submit" class="btn btn-default" value="更新我的信息"/>
                        <a th:href="@{/teaMe(id=${session.teaAll.getId()})}" style="margin-left: 80px" th:text="返回"/>
                    </div>
                </div>
            </form>

            <form  class="form-horizontal" th:if="${type=='pwd'}" th:action="@{/updTeaPwd}" method="post" style="margin: auto;margin-top:80px;border: 1px gray solid;width: 400px;background: #c7c4ff">
                <div style="margin-left: 100px">修改我的密码</div>

                <input type="text" name="id" th:value="${teacher.getId()}" hidden/>
                <input type="date" name="loginTime" th:value="${teacher.getLoginTime()}" hidden/>
                <input type="date" name="RegistTime" th:value="${teacher.getRegistTime()}" hidden/>
                <input type="text" name="zh" th:value="${teacher.getZh()}" hidden/>
                <input type="text" name="sex" th:value="${teacher.getSex()}" hidden/>
                <input type="text" name="name" th:value="${teacher.getName()}" hidden/>
                <input type="text" name="age" th:value="${teacher.getAge()}" hidden/>
                <!--						以下拉框来输入classid-->
                <br>
                <p  th:text="${error}" style="color: red;margin-left: 100px" th:if="${not #strings.isEmpty(error)}"></p>
                <div class="form-group" style="margin-left: 100px">
                    <label class="col-sm-4  control-label">旧密码：</label>
                    <div class="col-sm-10">
                        <input type="password" name="pwdOld">
                    </div>
                </div>
                <div class="form-group" style="margin-left: 100px">
                    <label class="col-sm-4  control-label">新密码：</label>
                    <div class="col-sm-10">
                        <input type="password" name="pwd">
                    </div>
                </div>
                <div class="form-group" style="margin-left: 50px">
                    <div class="col-sm-offset-2 col-sm-10">
                        <input type="submit" class="btn btn-default" value="更新密码"/>
                         <a class="btn-success" th:href="@{/teaMe(id=${session.teaAll.getId()})}" style="margin-left: 80px" th:text="返回"></a>
                    </div>
                </div>
            </form>


        </main>
    </div>
</div>


</body>

</html>